package com.monster.security.convert;

import com.monster.admin.user.domain.vo.LoginVo;
import com.monster.security.entity.UserDetail;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;

/**
 * 数据转换
 * @author kuang
 */
@Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE, componentModel = "spring")
public interface SecurityConvert {
    /**
     * 登录的时候vo转换
     * @param loginVo 登录查询的vo
     * @return spring security需要的对象
     */
    UserDetail toUserDetail (LoginVo loginVo);
}
